@layout("/common/_container.html",{js:["/assets/modular/system/task/steerTask.js"]}){
<div class="layui-body-header">
    <span class="layui-body-header-title">添加</span>
</div>
<style>
    .btnshop {
        display: inline-block;
        height: 38px;
        line-height: 38px;
        padding: 0 18px;
        background-color: #009688;
        color: #fff;
        white-space: nowrap;
        text-align: center;
        font-size: 14px;
        border: none;
        border-radius: 2px;
        cursor: pointer;
        margin-bottom: 10px;
    }

    .ws {
        background-color: #00BCD4;
    }

    .sunRenting {
        margin-bottom: 10px;
    }

    .gf {
        width: 100px;
    }

    .uploader-list {
        margin-left: -15px;
    }

    .uploader-list .info {
        position: relative;
        margin-top: -25px;
        background-color: black;
        color: white;
        filter: alpha(Opacity=80);
        -moz-opacity: 0.5;
        opacity: 0.5;
        width: 80px;
        height: 25px;
        text-align: center;
        display: none;
    }

    .uploader-list .handle {
        position: relative;
        background-color: black;
        color: white;
        filter: alpha(Opacity=80);
        -moz-opacity: 0.5;
        opacity: 0.5;
        width: 80px;
        text-align: right;
        height: 25px;
        margin-bottom: -18px;
        display: none;
    }

    .uploader-list .handle span {
        margin-right: 10px;
        font-size: 14px;
    }

    .uploader-list .handle span:hover {
        cursor: pointer;
    }

    .uploader-list .file-iteme {
        margin: 12px 0 0 15px;
        padding: 1px;
        float: left;
    }

    .zhu {
        color: red;
        padding-left: 160px;
    }
</style>
<style>
    dl {
        width: 120px;
        text-align: center;
        color: #e1e2e6;
        position: relative;
    }

    dl::before {
        content: '';
        display: block;
        width: 98px;
        height: 2px;
        background: #e1e2e6;
        position: absolute;
        top: 13px;
        left: 72px;
    }

    dt {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        border: 2px solid #e1e2e6;
        margin: 0 auto;
    }

    dts {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        border: 2px solid #64a84d;
        margin: 0 auto;
    }

    dd {
        margin: 0;
    }

    dl:last-child::before {
        display: none;
    }

    /*.current dt{background: #0f74a8;color: #fff;border-color: #0f74a8;}*/
    /*.current dd{color: #0f74a8;}*/
    /*.current::before{background: #0f74a8;}*/


    .dt1::before {
        content: '';
        display: block;
        width: 98px;
        height: 2px;
        background: #e1e2e6;
        position: absolute;
        top: 13px;
        left: 72px;
    }

    .dt1 {
        background-color: #64a84d;
        color: #FFFFFF;
        line-height: 22px;
        border: #F44336;
    }

    a:hover {
        color: #333;
    }
</style>
<style>
    /*弹性布局*/
    .flex {
        display: flex;
    }

    .flex.center {
        align-items: center;
    }

    .flex.stretch {
        align-items: stretch;
    }

    .flex.end {
        align-items: flex-end;
    }

    .flex.row {
        flex-flow: row;
    }

    .flex.row-reverse {
        flex-flow: row-reverse;
    }

    .flex.column {
        flex-flow: column;
    }

    .flex.justify {
        justify-content: space-between;
    }

    .flex.jc {
        -ms-justify-content: center;
        justify-content: center;
    }

    .flex.flow {
        flex-flow: wrap;
    }

    .flex.hide {
        display: none;
    }
</style>
<style type="text/css">
    .layui-table-cell {
        height: auto;
        line-height: 55px;
    }
    .layui-input-block {
        display: flex !important;
        margin-left:160px !important;
    }
    .layui-form-label{
        width: 130px !important;
        min-width: 130px !important;
    }
    .padleft{
        padding-left: 10px;
    }
    .marleft{
        margin-left: 10px;
    }
</style>
<div class="layui-fluid " style="">
    <div class="layui-card">
        <div class="layui-card-body">
            @if(shiro.hasPermission("/project/ddbc")){
            <div class="line-box flex ">
                <dl class="11">
                    <dt>1</dt>
                    <span>已完成</span>
                </dl>
                <dl class="19">
                    <dt>2</dt>
                    <span>已完成</span>
                </dl>
                <dl class="21">
                    <dt>3</dt>
                    <span>已完成</span>
                </dl>
                <dl class="18">
                    <dt>4</dt>
                    <span>已完成</span>
                </dl>
                <dl class="22">
                    <dt>5</dt>
                    <span>已完成</span>
                </dl>
                <dl class="16">
                    <dt>6</dt>
                    <span>已完成</span>
                </dl>
                <dl class="36">
                    <dt>7</dt>
                    <span>已完成</span>
                </dl>
                <dl class="15">
                    <dt>8</dt>
                    <span>已完成</span>
                </dl>
                <dl class="17">
                    <dt>9</dt>
                    <span>已完成</span>
                </dl>
                <dl class="23">
                    <dt>10</dt>
                    <span>已完成</span>
                </dl>
                <dl class="13">
                    <dt>11</dt>
                    <span>已完成</span>
                </dl>
            </div>
            @}
            <form id="taskForm" lay-filter="taskForm" class="layui-form model-form"
                  style="max-width: 700px;margin: 40px auto;">
                <input id="role" hidden value="${role}">
                <input id="name" hidden value="${name}">
                <p style="margin-left: 15px">1. 基本信息</p>
                <div id="oneAll" style="margin-left: 43px">
                    <input name="id" id="proId" type="hidden" value="${id}"/>
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left;">1-1营业执照</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="wwztimg" id="wwztimg" class="msg">
                            <input class="taskId" value="11" hidden>
                            <div class="layui-upload" style="width: 82%;margin-right: 15px;85%">
                                @if(shiro.hasPermission("/project/ddbc")){
                                <button type="button" class="layui-btn ws" id="many_wwztimg_upload_btn">上传营业执照</button>
                                <a class="reason" style="display: none;">驳回原因</a>
                                @}
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list uploader-list msg" style="overflow: auto;"
                                         id="uploader-list-wwztimg"></div>
                                </blockquote>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">营业执照年审日期</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="yyrq" name="ygTime" placeholder="请选择年审日期" type="text"
                                   class="layui-input msg sj" style="width: 85%;margin-right: 10px"
                                   autocomplete="off"/>
                            <input class="taskId" value="45" hidden>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">营业执照名称</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="yyzzmc" name="yyzzmc" placeholder="请填写营业执照名称" type="text"
                                   class="layui-input msg sj" style="width: 85%;margin-right: 10px"
                                   autocomplete="off"/>
                            <input class="taskId" value="56" hidden>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">统一社会信用代码</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="xydm" name="xydm" placeholder="统一社会信用代码" type="text"
                                   class="layui-input msg sj" style="width: 85%;margin-right: 10px"
                                   autocomplete="off"/>
                            <input class="taskId" value="57" hidden>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name " style="text-align: left;">营业执照地址</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="yyzzdz" name="yyzzdz" placeholder="营业执照地址" type="text"
                                  class="layui-input msg sj" style="width: 85%;"
                                  autocomplete="off"/>
                            <input class="taskId" value="58" hidden>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">法人姓名</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="frxm" name="frxm" placeholder="法人姓名" type="text"
                                   class="layui-input msg sj" style="width: 85%;margin-right: 10px"
                                   autocomplete="off"/>
                            <input class="taskId" value="59" hidden>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name " style="text-align: left;">法人身份证号</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="sfz" name="sfz" placeholder="法人身份证号" type="text"
                                   class="layui-input msg sj" style="width: 85%;"
                                   autocomplete="off"/>
                            <input class="taskId" value="60" hidden>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left;">1-2法人身份证</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="xsjztimg" id="xsjztimg" class="msg">
                            <input class="taskId" value="42" hidden>
                            <div class="layui-upload" style="width: 82%;margin-right: 15px;85%">
                                @if(shiro.hasPermission("/project/ddbc")){
                                <button type="button" class="layui-btn ws" id="many_xsjztimg_upload_btn">上传法人身份证（正反面）
                                </button>
                                @}
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list uploader-list msg" style="overflow: auto;"
                                         id="uploader-list-xsjztimg"></div>
                                </blockquote>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">1-3 店长姓名</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="dzxm" name="ygTime" placeholder="请输入店长姓名" type="text"
                                   class="layui-input msg" style="width: 85%;margin-right: 10px" autocomplete="off"/>
                            <input class="taskId" value="47" hidden>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">1-4 店长电话</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="dzdh" name="ygTime" placeholder="请输入店长电话" type="text"
                                   class="layui-input msg" style="width: 85%;margin-right: 10px" autocomplete="off"
                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                   onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
                            <input class="taskId" value="46" hidden>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">1-5 门店地址</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="mddz" name="ygTime" placeholder="请输入店门店地址" type="text"
                                   class="layui-input msg" style="width: 85%;margin-right: 10px" autocomplete="off"/>
                            <input class="taskId" value="55" hidden>
                        </div>
                    </div>
                </div>
                @if(shiro.hasPermission("/project/ddbc")){
                <div style="text-align: center">
                    <input class="btnshop" type="button" value="提交" style="width: 70px"
                           id="55">
                </div>
                <div class="editBox" style="text-align: center; display: none">
                    <input class="btnshop edit" type="button" value="修改" style="width: 70px;"
                           id="ying">
                </div>
                @}
                @if(shiro.hasPermission("/project/ckdd")){
                <p style="margin-left: 15px">2. 可乐机</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left">可乐机</label>
                        <div class="layui-input-block">
                            <input id="coke" name="coke" type="text" class="layui-input msg" readonly
                                style="border: none;width: 85%;padding-left: 0;" value="未报备"/>
                            <input class="taskId" value="19" hidden>
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">3. 收银系统</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left">收银系统</label>
                        <div class="layui-input-block">
                            <input id="cashier" name="cashier" type="text" class="msg"
                                readonly
                                style="border: none;width: 85%" value="收银系统未确认"/>
                            <input class="taskId" value="21" hidden>
                            @if(shiro.hasPermission("/project/syxt")){
                            <button class="btnshop" type="button" id="21">确认</button>
                            @}
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">4. 股份是否缴齐</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label gf name" style="text-align: left">股份是否缴齐</label>
                        <div class="layui-input-block">
                            <input name="shares" readonly id="shares" style="border: none;width: 85%;"
                                class="msg" autocomplete="off" value="股份未缴齐">
                            <input class="taskId" value="18" hidden>
                            @if(shiro.hasPermission("/project/ddbc")){
                            <input class="btnshop" type="button" value="确认"
                                id="18">
                            @}
                        </div>
                    </div>
                </div>
                @}
                <p style="margin-left: 15px">5. 预估开业时间</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">预估开业时间</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="ygTime" name="ygTime" type="text" readonly="readonly" value="尚未确认预估开业时间"
                                class="layui-input msg sj" style="width: 85%;border: none;padding-left: 0;"
                                autocomplete="off"/>
                            <input class="taskId" value="22" hidden>
                            <input class="btnshop" type="button" value="修改" style="width: 70px;"
                                id="yg">
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">6. 确认开业时间</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">确认开业时间</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row">
                            <input id="openTime" name="openTime" placeholder="请选择时间" type="text"
                                class="layui-input msg sj" style="width: 85%;" autocomplete="off"/>
                            <input class="taskId" value="16" hidden>
                            @if(shiro.hasPermission("/project/ddbc")){
                            <input class="btnshop" type="button" value="提交" style="width: 70px"
                                id="16">
                            <input class="btnshop editDate" type="button" value="修改" style="width: 70px;display: none"
                                id="ky">
                            @}
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">7. 网上建店</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left">网上建店</label>
                        <div class="layui-input-block name">
                            <input id="shop" name="shop" type="text" readonly
                                class="msg" style="border: none;width: 85%;"
                                autocomplete="off"
                                value="尚未确认"/>
                            <input class="taskId" value="36" hidden>
                            @if(shiro.hasPermission("/project/wsjd")){
                            <a class="btnshop" type="button" id="36">确认</a>
                            @}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">线上套餐</label>
                        <div class="layui-input-block name">
                            <input id="surMeal" name="surMeal" type="text" readonly
                                class="msg" style="border: none;width: 85%;"
                                autocomplete="off"
                                value="尚未确认"/>
                            <input class="taskId" value="37" hidden>
                            @if(shiro.hasPermission("/project/wsjd")){
                            <a class="btnshop" type="button" id="37">确认</a>
                            @}
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">排队机</label>
                        <div class="layui-input-block name">
                            <input id="queuing" name="queuing" type="text" readonly
                                class="msg" style="border: none;width: 85%;"
                                autocomplete="off"
                                value="尚未确认"/>
                            <input class="taskId" value="38" hidden>
                            @if(shiro.hasPermission("/project/wsjd")){
                            <a class="btnshop" type="button" id="38">确认</a>
                            @}
                        </div>
                    </div>
                </div>
                @if(shiro.hasPermission("/project/ckdd")){
                <p style="margin-left: 15px">8. 配送到货日期</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left;">配送到货日期</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row;height: 33px;">
                            <input id="distribution" name="openTime" placeholder="请选择时间" type="text"
                                class="layui-input msg sj" style="width: 85%;" autocomplete="off"/>

                            <input class="taskId" value="15" hidden>

                        </div>
                        <text class="zhu">（注：此日期为要求配送到店的日期）</text>

                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left;">备注</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row;height: 33px;">
                            <input id="note" name="note" placeholder="请备注此日期是否为准确日期" type="text" value="无"
                                class="layui-input msg" style="width: 85%;" autocomplete="off"/>

                            @if(shiro.hasPermission("/project/ddbc")){
                            <input class="btnshop editDateps" type="button" value="修改" style="width: 70px;display: none"
                                id="ps">
                            <input class="btnshop" type="button" value="提交"
                                id="15">
                            @}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label name" style="text-align: left;">确认到货</label>
                        <div class="layui-inline" style="display: flex;flex-direction: row;height: 33px;">
                            <input id="arrival" name="arrival" value="待发货" type="text" readonly
                                class="layui-input msg" style="width: 85%;border: none;padding: 0;"
                                autocomplete="off"/>
                            <input class="btnshop" type="button" value="确认"
                                id="dh">
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">9. 当地供货商</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item">
                        <label class="layui-form-label name gf" style="text-align: left;">当地供货商</label>
                        <div class="layui-input-block">
                            <input id="supplier" name="supplier" type="text" readonly
                                class="msg" style="border: none;width: 85%;" autocomplete="off"
                                value="未确认"/>
                            <input class="taskId" value="17" hidden>
                            @if(shiro.hasPermission("/project/ddbc")){
                            <input class="btnshop" type="button" value="确认"
                                id="17">
                            @}
                        </div>
                    </div>
                </div>
                <p style="margin-left: 15px">10. 宿舍信息</p>
                <div  style="margin-left: 43px">
                    <div class="layui-form-item" id="zf">
                        <label class="layui-form-label gf" style="text-align: left"></label>
                        <div class="layui-form-item" style="display: inline-block">
                            <div style="display: inline-block">
                                <label class="layui-form-label name">日期</label>
                                <div class="layui-inline sunRenting">
                                    <input id="rentingData" name="rentingData" placeholder="请选择日期" type="text"
                                        autocomplete="off" class="layui-input msg sj"/>
                                    <input class="taskId" value="23" hidden>
                                </div>
                            </div>
                            <div style="display: inline-block">
                                <label class="layui-form-label name ">价格</label>
                                <div class="layui-inline  sunRenting">
                                    <input id="prices" name="prices" placeholder="请输入价格" type="text"
                                        class="layui-input msg Mj"
                                        autocomplete="off"/>
                                    <input class="taskId" value="24" hidden>
                                </div>
                            </div>
                            <div style="display: inline-block">
                                <label class="layui-form-label name ">押金</label>
                                <div class="layui-inline  sunRenting">
                                    <input id="deposit" name="deposit" placeholder="请输入押金" type="text"
                                        class="layui-input msg Mj"
                                        autocomplete="off"/>
                                    <input class="taskId" value="25" hidden>
                                </div>
                            </div>
                            <div style="display: inline-block">
                                <label class="layui-form-label name ">面积</label>
                                <div class="layui-inline sunRenting">
                                    <input id="area" name="area" placeholder="请输入面积" type="text" class="layui-input msg Mj"
                                        autocomplete="off"/>
                                    <input class="taskId" value="26" hidden>
                                </div>
                            </div>
                            <div style="display: inline-block">
                                <label class="layui-form-label name ">地址</label>
                                <div class="layui-inline sunRenting">
                                    <input id="address" name="address" placeholder="请输入地址" type="text"
                                        class="layui-input msg"
                                        autocomplete="off"/>
                                    <input class="taskId" value="27" hidden>
                                </div>
                            </div>
                            <div style="display: inline-block">
                                <label class="layui-form-label sunRenting name ">房东电话</label>
                                <div class="layui-inline">
                                    <input id="phone" name="phone" placeholder="请输入电话" type="text" class="layui-input msg"
                                        autocomplete="off" onkeyup="this.value=this.value.replace(/\D/g,'')"
                                        onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
                                    <input class="taskId" value="29" hidden>
                                </div>
                            </div>
                            <div class="layui-input-block" style="display: inline-block">
                                @if(shiro.hasPermission("/project/ddbc")){
                                <input class="btnshop" value="提交" type="button" style="width: 70px;margin-right: 30px"
                                    id="23">
                                <input class="btnshop editSushe" value="修改" type="button"
                                    style="width: 70px;margin-right: 30px;display: none"
                                    id="sushe">
                                @}
                            </div>
                        </div>
                    </div>
                </div>
                @}
                <p style="margin-left: 15px">11. 食品经营许可证</p>
                <div  style="margin-left: 43px">
                    <div id="ws">
                        <div class="layui-form-item">
                            <label class="layui-form-label name gf" style="text-align: left">食品经营许可证</label>
                            <div class="layui-input-block">
                                <input type="hidden" name="dgztimg" id="dgztimg" class="msg">
                                <input class="taskId" value="13" hidden>
                                <div class="layui-upload" style="width: 83%;margin-right: 15px;85%">
                                    @if(shiro.hasPermission("/project/ddbc")){
                                    <button type="button" class="layui-btn ws" id="many_dgztimg_upload_btn">上传食品经营许可证</button>
                                    @}
                                    <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                        预览图：
                                        <div class="layui-upload-list uploader-list msg" style="overflow: auto;"
                                            id="uploader-list-dgztimg"></div>
                                    </blockquote>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label name gf"
                                style="text-align: left;">食品经营许可证截止日期</label>
                            <div class="layui-inline" style="display: flex;flex-direction: row">
                                <input id="wsrq" name="ygTime" placeholder="请选择截止日期" type="text"
                                    class="layui-input msg sj" style="width: 85%;"
                                    autocomplete="off"/>
                                <input class="taskId" value="44" hidden>
                                @if(shiro.hasPermission("/project/ddbc")){
                                <input class="btnshop" type="button" value="提交" style="width: 70px"
                                    id="44">
                                <input class="btnshop editWs" type="button" value="修改" style="width: 70px;display: none"
                                    id="weiS">
                                @}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label name" style="width: 100px;"></label>
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-primary" type="button" id="backupPage">&emsp;返回&emsp;
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="https://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="application/javascript">
    const id = '${id}';
    const list = [${list}];
    var _list = list[0][0];

    function handleList(_id) {
        let obj = null;
        _list.map((item, index) => {
            if (item.taskId == _id) {
                obj = item
            }
        });
        return obj
    }

    // 保留两位小数
    $(".Mj").keyup(function () {
        var reg = /^\d+\.?(\d{1,2})?$/;
        while (!reg.test($(this).val()) && $(this).val() != "") {
            $(this).val(checkStr($(this).val()));
        }
    });

    //检查是否符合金额格式:只能输入数字且最多保留小数点后两位
    function checkStr(str) {
        str = str.substring(0, str.length - 1);
        return str;
    }


    $(function () {
        $.ajax({
            type: "get",
            url: "/btyDoubleCard/rejectReason?proId="+id,
            data: "",
            contentType: 'application/json',
            async: false,
            success: function (res) {
                if(res.success && res.data && res.data.rejectReason){
                    $(".reason").show().text("驳回原因："+res.data.rejectReason)
                }
            }, error: function (rs) {}
        });

        if ($("#role").val() != "1") {
            $("input").attr("disabled", "disabled");
        }
        $("#proId").val(id);

        // 编辑按钮默认不显示
        var infoA = [11, 45, 42, 47, 46, 55];//营业执照
        var infoB = [16];//开业时间
        var infoC = [23, 24, 25, 26, 27, 29];//宿舍信息
        var infoD = [13, 44];//食品经营许可证
        var infoE = [15];//配送要货

        // 第一个修改 默认不显示
        let hideBtnEditA = true;
        // 第二个修改 默认不显示
        let hideBtnEditB = true;
        // 第三个修改 默认不显示
        let hideBtnEditC = true;
        // 第四个修改 默认不显示
        let hideBtnEditD = true;
        // 第四个修改 默认不显示
        let hideBtnEditE = true;

        $(".name").each(function (o, e) {
            let _taskId = $(e).next().find('.taskId').val();

            var _param = handleList(_taskId);

            // 营业执照
            if ($.inArray(Number(_taskId), infoA) != -1) {
                hideBtnEditA = true
            }
            //开业时间
            if ($.inArray(Number(_taskId), infoB) != -1) {
                hideBtnEditB = true
            }
            //宿舍信息
            if ($.inArray(Number(_taskId), infoC) != -1) {
                hideBtnEditC = true
            }
            //食品经营许可证
            if ($.inArray(Number(_taskId), infoD) != -1) {
                hideBtnEditD = true
            }
            //配送要货
            if ($.inArray(Number(_taskId), infoE) != -1) {
                hideBtnEditE = true
            }
            if (_taskId == "15") {
                $("#note").val(_param.note);
                $('#dh').attr("disabled", "disabled");
                $('#dh').css('background', '#E1E2E6');
                $('#ps').attr("disabled", "disabled");
                $('#ps').css('background', '#E1E2E6');
                // $('#note').attr("disabled", "disabled");
                // $('#note').css('background','#E1E2E6');
                if (_param.status == '0') {
                    $("#arrival").val("待发货");
                    $('#ps').attr("disabled", false);
                    $('#ps').css('background', '#009688');
                    $('#note').attr("disabled", false);
                    $('#note').css('background', '#FFF');
                    $('#dh').attr("disabled", "disabled");
                    $('#dh').css('background', '#E1E2E6');
                } else if (_param.status == '1') {
                    $("#arrival").val("已发货");
                    $('#dh').attr("disabled", false);
                    $('#dh').css('background', '#009688');
                    $('#ps').attr("disabled", "disabled");
                    $('#ps').css('background', '#E1E2E6');
                } else if (_param.status == '2') {
                    $("#arrival").val("已到货");
                    $('#dh').attr("disabled", "disabled");
                    $('#dh').css('background', '#E1E2E6');
                    $('#note').attr("disabled", "disabled");
                    $('#note').css('background', '#E1E2E6');
                }
            }
            if (_param && _param.content != null && _param.content != '') {
                $(e).next().find('.msg').val(_param.content);

                // $(e).next().find('.msg').attr("readonly", "true");
                // $(e).next().find('.sj').removeAttr('id');
                // 营业执照
                if ($.inArray(Number(_taskId), infoA) != -1) {
                    hideBtnEditA = false
                }
                //开业时间
                if ($.inArray(Number(_taskId), infoB) != -1) {
                    hideBtnEditB = false
                }
                //宿舍信息
                if ($.inArray(Number(_taskId), infoC) != -1) {
                    hideBtnEditC = false
                }
                //食品经营许可证
                if ($.inArray(Number(_taskId), infoD) != -1) {
                    hideBtnEditD = false
                }
                //配送要货
                if ($.inArray(Number(_taskId), infoE) != -1) {
                    hideBtnEditE = false
                }

                if (_taskId == "19") {
                    if (_param.content == "可乐机已安装完成") {
                        $("#" + _taskId + "").hide();
                        $("." + _taskId + "").css('color', '#64a84d');
                    }
                } else if (_taskId == "21") {

                    if (_param.content == "收银账号已建完，收银档案未建完" && $("#name").val() != "韩铭渲") {
                        $("#" + _taskId + "").hide();
                        // $("." + _taskId + "").css('color', '#64a84d');
                    }  else if (_param.content == "收银档案已建完") {
                        $("#" + _taskId + "").hide();
                        $("." + _taskId + "").css('color', '#64a84d');
                    }
                } else {
                    $("#" + _taskId + "").hide();
                    $("." + _taskId + "").css('color', '#64a84d');
                }


                if (_taskId == "11") {
                    let a = _param.content.split(",");
                    for (let j = 0; j < a.length; j++) {
                        $("#uploader-list-wwztimg").append(
                            '<div id="pic" class="file-iteme">' +
                            '<div class="handle"><span class="layui-icon">点击删除</span></div>' +
                            "<div class='gs-upload-file-container'>" +
                            "<div class='gs-upload-ele'>" +
                            "<div class='progress-bar progress-bar-success progress-bar-striped gs-upload-progress-bar' style='width: 188px; display: none;'></div>" +
                            "<div class='gs-upload-ele-img-div'>" +
                            "<img class='gs-upload-ele-img' src='" + a[j] + "' style='cursor: pointer;width: 80px;height: 80px;'>" +
                            "</div>	" +
                            "<div class='gs-upload-ele-content'>" +
                            "<div class='gs-upload-ele-title-div'></div>" +
                            "<div class='gs-upload-ele-menu'>" +
                            "</div></div></div></div></div>"
                        );
                        $(document).on("mouseenter mouseleave", ".file-iteme", function (event) {
                            if (event.type === "mouseenter") {
                                //鼠标悬浮
                                $(this).children(".info").fadeIn("fast");
                                $(this).children(".handle").fadeIn("fast");
                            } else if (event.type === "mouseleave") {
                                //鼠标离开
                                $(this).children(".info").hide();
                                $(this).children(".handle").hide();
                            }
                        });
                        // 删除图片
                        $(document).on("click", ".file-iteme .handle", function (event) {
                            $(this).parent().remove();
                        });


                    }
                } else if (_taskId == "13") {
                    let a = _param.content.split(",");
                    for (let w = 0; w < a.length; w++) {
                        $("#uploader-list-dgztimg").append(
                            '<div id="pic" class="file-iteme">' +
                            '<div class="handle"><span class="layui-icon">点击删除</span></div>' +
                            "<div class='gs-upload-file-container'>" +
                            "<div class='gs-upload-ele'>" +
                            "<div class='progress-bar progress-bar-success progress-bar-striped gs-upload-progress-bar' style='width: 188px; display: none;'></div>" +
                            "<div class='gs-upload-ele-img-div'>" +
                            "<img class='gs-upload-ele-img' src='" + a[w] + "' style='cursor: pointer;width: 80px;height: 80px;'>" +
                            "</div>	" +
                            "<div class='gs-upload-ele-content'>" +
                            "<div class='gs-upload-ele-title-div'></div>" +
                            "<div class='gs-upload-ele-menu'>" +
                            "</div></div></div></div></div>"
                        );
                        $(document).on("mouseenter mouseleave", ".file-iteme", function (event) {
                            if (event.type === "mouseenter") {
                                //鼠标悬浮
                                $(this).children(".info").fadeIn("fast");
                                $(this).children(".handle").fadeIn("fast");
                            } else if (event.type === "mouseleave") {
                                //鼠标离开
                                $(this).children(".info").hide();
                                $(this).children(".handle").hide();
                            }
                        });
                        // 删除图片
                        $(document).on("click", ".file-iteme .handle", function (event) {
                            $(this).parent().remove();
                        });

                    }
                } else if (_taskId == "42") {
                    let a = _param.content.split(",");
                    for (let q = 0; q < a.length; q++) {
                        $("#uploader-list-xsjztimg").append(
                            '<div id="pic" class="file-iteme">' +
                            '<div class="handle"><span class="layui-icon">点击删除</span></div>' +
                            "<div class='gs-upload-file-container'>" +
                            "<div class='gs-upload-ele'>" +
                            "<div class='progress-bar progress-bar-success progress-bar-striped gs-upload-progress-bar' style='width: 188px; display: none;'></div>" +
                            "<div class='gs-upload-ele-img-div'>" +
                            "<img class='gs-upload-ele-img' src='" + a[q] + "' style='cursor: pointer;width: 80px;height: 80px;'>" +
                            "</div>	" +
                            "<div class='gs-upload-ele-content'>" +
                            "<div class='gs-upload-ele-title-div'></div>" +
                            "<div class='gs-upload-ele-menu'>" +
                            "</div></div></div></div></div>"
                        );
                        $(document).on("mouseenter mouseleave", ".file-iteme", function (event) {
                            if (event.type === "mouseenter") {
                                //鼠标悬浮
                                $(this).children(".info").fadeIn("fast");
                                $(this).children(".handle").fadeIn("fast");
                            } else if (event.type === "mouseleave") {
                                //鼠标离开
                                $(this).children(".info").hide();
                                $(this).children(".handle").hide();
                            }
                        });
                        // 删除图片
                        $(document).on("click", ".file-iteme .handle", function (event) {
                            $(this).parent().remove();
                        });
                    }
                }
            }
        });
        // 营业执照
        if (!hideBtnEditA) {
            $('.editBox').css("display", "block");
        } else {
            $('.editBox').css("display", "none");
        }
        // 开业时间
        if (!hideBtnEditB) {
            $('.editDate').css("display", "block");
        } else {
            $('.editDate').css("display", "none");
        }
        // 宿舍信息
        if (!hideBtnEditC) {
            $('.editSushe').css("display", "block");
        } else {
            $('.editSushe').css("display", "none");
        }
        // 食品经营许可证
        if (!hideBtnEditD) {
            $('.editWs').css("display", "block");
        } else {
            $('.editWs').css("display", "none");
        }
        // 配送要货
        if (!hideBtnEditE) {
            $('.editDateps').css("display", "block");
        } else {
            $('.editDateps').css("display", "none");
        }

        for (let i = 0; i < list[0][0].length; i++) {
            let taskId = list[0][0][i].taskId;
            if (taskId == "36" || taskId == "37" || taskId == "38") {
                $("#" + taskId + "").val(list[0][0][i].status);
            }

            setTimeout(() => {
                //图片预览
                layer.photos({
                    photos: '.layui-upload-list',
                    anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
                });
            }, 300)

        }
    });
</script>
@}